import { Login } from "@/api/interface/index";
import { PORT1 } from "@/api/config/servicePort";
import { obj2fd } from "@/utils/index";
import http from "@/api";
// 查询列表
export const getDataByPage = (params: object) => {
  return http.get(PORT1 + `/secure/ifaceSentryList`, params); // 正常 post json 请求  ==>  application/json
};
// 新增
export const addData = (params: object) => {
  return http.post(PORT1 + `/secure/ifaceSentryAdd`, params, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 更新
export const editData = (params: object) => {
  return http.post(PORT1 + `/secure/ifaceSentryUpdate`, params, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 删除列表
export const deleteData = (params: object) => {
  return http.post(PORT1 + `/secure/ifaceSentryDel`, params, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 导入
export const importData = (params: object) => {
  return http.post(PORT1 + `/secure/ifaceSentryImport/${params.ifid}`, obj2fd({ file: params.file }), { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 导出
export const exportData = params => {
  return http.get(PORT1 + `/secure/ifaceSentryExport/${params.ifid}`, {}, { loading: false, responseType: "blob" }); // 正常 post json 请求  ==>  application/json
};
// 获取配置列表
export const getCfgList = params => {
  return http.get(PORT1 + `/secure/scfgList`, params, { loading: true }); // 正常 post json 请求  ==>  application/json
};
// 更新配置列表
export const scfgUpdate = params => {
  return http.post(PORT1 + `/secure/scfgUpdate`, params, { loading: true }); // 正常 post json 请求  ==>  application/json
};
// 配置指纹
export const scfgBatchFing = params => {
  return http.post(PORT1 + `/secure/scfgBatchFing`, params, { loading: true }); // 正常 post json 请求  ==>  application/json
};
// 配置高交
export const scfgBatchHserver = params => {
  return http.post(PORT1 + `/secure/scfgBatchHserver`, params, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 获取配置详情
export const scfgEditDetail = params => {
  return http.get(PORT1 + `/secure/scfgEdit/${params.id}`, params, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// 获取配置详情
export const ifaceAttrIpList = params => {
  return http.get(PORT1 + `/secure/ifaceAttrIpList/${params.ifid}`, {}, { loading: false }); // 正常 post json 请求  ==>  application/json
};
// lan-获取编辑详情
export const ifaceSentryEdit = params => {
  return http.get(PORT1 + `/secure/ifaceSentryEdit/${params.id}`, {}, { loading: false }); // 正常 post json 请求  ==>  application/json
};
